﻿using System.Runtime.Serialization;
using System.Windows.Media;
using System.Windows.Media.Media3D;

namespace GameBoard
{
    [DataContract]
    public class TubeVisualData : BaseTerrainData
    {
        

        Point3DCollection _path = new Point3DCollection();
        [DataMember]
        public Point3DCollection Path 
        {
            get { return _path; }
            set 
            { 
                _path = value;
                _centerOfTerrainFeature = Helper3DCalcs.FindMidpoint(_path);
                _zoomHeight = ((_path[0] - _centerOfTerrainFeature).Length * 2);
            } 
        }

        [DataMember]
        public double Diameter { get; set; }

        

        private Point3D _centerOfTerrainFeature = new Point3D();
        double _zoomHeight = 0;
        public override Point3D CenterOfTerrainFeature
        {
            get
            {
                return _centerOfTerrainFeature;
            }
        }
        public override double ZoomHeight
        {
            get { return _zoomHeight; }
        }
        public override string ItemDescription
        {
            get
            {
                return "Tube";
            }
        }

    }
}